package jsyf.oa.web.business;

import com.alibaba.fastjson.JSONObject;
import io.swagger.annotations.Api;
import jsyf.com.util.BaseUtils;
import jsyf.com.util.ResponseUtils;
import jsyf.oa.facade.business.BusinessFacade;
import jsyf.oa.facade.business.BusinessMatterFacade;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * Created by 92852 on 2018/3/30.
 */
@Api(value = "临时事项类型申请接口", description = "临时事项类型申请接口")
@Controller
@RequestMapping("/businessMatter")
public class BusinessMatterController {
    @Resource
    private BusinessMatterFacade businessMatterFacade;

    /*商务临时事项*/
    @RequestMapping(value = "/getBusinessMatterList.json", method = RequestMethod.POST)
    public void getBusinessMatterList(HttpServletResponse response) {
        List<JSONObject> records = this.businessMatterFacade.getBusinessMatterList();
        ResponseUtils.putJsonResponse(response, BaseUtils.succsessArrRespond(records));
    }


}
